import request from '@/utils/request'

export function fetchPrdCataList(query) {
  return request({
    url: '/prd_cata_dict/page',
    method: 'get',
    params: query
  })
}

export function createPrdCata(data) {
  return request({
    url: '/prd_cata_dict',
    method: 'post',
    data
  })
}

export function updatePrdCata(data) {
  return request({
    url: `/prd_cata_dict/${data.id}`,
    method: 'put',
    data
  })
}

export function deletePrdCata(id) {
  return request({
    url: `/prd_cata_dict/${id}`,
    method: 'delete'
  })
}

export function changePrdCataStatus(data) {
  return request({
    url: `/prd_cata_dict/${data.id}`,
    method: 'put',
    data
  })
}
